define(() => {
    return function (goods,id) {
        return goods.forEach(function(value,index) {
            // console.log(index);
            // console.log(id);
            console.log(goods[index].id);
            if(goods[index].id === id){
                // console.log(goods[index].num * goods[index].price);
                // console.log($(".sum")[index]);
                $(".sum")[index].innerHTML=goods[index].num * goods[index].price;
                // $(".sum").eq(index).html(goods[index].num * goods[index].price);
            }
        });
    }
})
